
class DecoratorThing < ContainerThing
  #attribute :child

  def add *a
    if children.length == 0
      super
    else
      raise 'There can be only one!'
    end
  end

  def child= thing
    children[0] = thing
  end

  def child
    children[0]
  end

  def go e
    if child
      child.go(e)
    end
    super(e)
  end


  def creator e
    if child
      child.creator e
    else
      super
    end
  end
  
end
